#include "Settings.h"


Settings::Settings(QString fileName, Format format) : QSettings(fileName, format) {
}


QVariant Settings::getValue(QString name){
    QSettings settings(QString(this -> value("applicationName").toString()));
    QVariant value = settings.value(name);

    if (!value.toString().size()){
        return this -> value(name);
    } else  {
        return value;
    }
}

void Settings::setValue(QString name, QVariant value){
    QSettings settings(this -> value("applicationName").toString());
    settings.setValue(name, value);
}
